// EyeOnIE.h : Declaration of the CEyeOnIE

#ifndef __EYEONIE_H_
#define __EYEONIE_H_

#include "resource.h"       // main symbols
#include "ExDisp.h"

/////////////////////////////////////////////////////////////////////////////
// CEyeOnIE
class ATL_NO_VTABLE CEyeOnIE : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CEyeOnIE, &CLSID_EyeOnIE>,
	public IObjectWithSiteImpl<CEyeOnIE>,
	public IDispatchImpl<IEyeOnIE, &IID_IEyeOnIE, &LIBID_BHOPLUGINLib>
{
public:
	CEyeOnIE()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_EYEONIE)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CEyeOnIE)
	COM_INTERFACE_ENTRY(IEyeOnIE)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(IObjectWithSite)
END_COM_MAP()

	void dir();
	void file();
// IEyeOnIE
public:
	void CEyeOnIE::checkurl(char* inurl,char* outurl,int size);
	void log(char * s);
	CComQIPtr<IWebBrowser2, &IID_IWebBrowser2> mWebBrowser2;
	DWORD       mCookie;   // Connection Token

	STDMETHOD(SetSite)(IUnknown *pUnkSite);
	HRESULT RegisterEventHandler(BOOL inAdvise);

	STDMETHOD(Invoke)(DISPID dispidMember,REFIID riid, LCID lcid, WORD wFlags,
                     DISPPARAMS * pDispParams, VARIANT * pvarResult,
                     EXCEPINFO * pexcepinfo, UINT * puArgErr);
private:
	void CEyeOnIE::getpath(TCHAR* path,unsigned long * size);

};

#endif //__EYEONIE_H_
